<include file="public@header" />
</head>

<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li>
				<a href="{:url('ads/lists')}">Advertisement list</a>
			</li>
			<li class="active">
				<a href="{:url('ads/add')}">Add Advertisement</a>
			</li>
		</ul>
		<form method="post" class="form-horizontal margin-top-20" action="{:url('ads/addpost')}">
			<div class="form-group">
				<label for="input-user_login" class="col-sm-2 control-label">
					<span class="form-required">*</span>{:lang('Title')}</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_login" name="post[news_title]" required>
				</div>
			</div>

			<div class="form-group">
				<label for="input-user_login" class="col-sm-2 control-label">
					<span class="form-required">*</span>{:lang('image')}</label>
				<div class="col-md-6 col-sm-10">
					<table class="table table-bordered">
						<tr>
							<th>
								<b>{:lang('thumb')}</b>
							</th>
						</tr>
						<tr>
							<td>
								<div style="text-align: center;">
									<input type="hidden" name="post[more][thumbnail]" id="thumbnail" value="">
									<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
										<img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumbnail-preview" width="135" style="cursor: pointer"
										/>
									</a>
									<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
								</div>
							</td>
						</tr>
					</table>
				</div>
			</div>

			<div class="form-group">
				<label for="input-user_login" class="col-sm-2 control-label">
					<span class="form-required">*</span>{:lang('STATUS')}</label>
				<div class="col-md-6 col-sm-10">
					<div class="checkbox">
						<label>
							<input type="checkbox" name="post[news_status]" value="1" checked>Publish
						</label>
					</div>
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script type="text/javascript">
		//编辑器路径定义
		var editorURL = GV.WEB_ROOT;
	</script>
	<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript">
		$(function () {

			editorcontent = new baidu.editor.ui.Editor();
			editorcontent.render('content');
			try {
				editorcontent.sync();
			} catch (err) {
			}

			$('.btn-cancel-thumbnail').click(function () {
				$('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
				$('#thumbnail').val('');
			});

		});
	</script>
</body>

</html>






<include file="public@header" />
<style type="text/css">
	.pic-list li {
		margin-bottom: 5px;
	}
</style>
</head>